package com.saris.primego.dao;

import com.saris.primego.pojo.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface UserRepository extends JpaRepository<User, Long> , JpaSpecificationExecutor<User> {
    List<User> findByOpenid(String openid);

    long countByCreateTimeBetween(LocalDateTime createTimeAfter, LocalDateTime createTimeBefore);

    long countByCreateTimeBefore(LocalDateTime createTimeBefore);
}
